<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>
<link href="scripts/css/ui/jquery-ui-1.8.21.custom.css" rel="stylesheet" type="text/css" />  
<script src="scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="scripts/jquery-ui-1.8.21.custom.min.js" type="text/javascript"></script>
<script src="scripts/time.js" type="text/javascript"></script>
<script src="scripts/tiny_mce/jquery.tinymce.js" type="text/javascript"></script>
<script type="text/javascript" src="scripts/ajaxfileupload.js"></script>
<script src="scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script type="text/javascript">
       $(document).ready(
        function () {
        $("#login_form").hide();
        $("#panelContent").hide();
        $("#HeadPanel").click(
        function (){
            $("#panelContent").toggle("slow");
        });
        $("[rel='tanggal']").datepicker(
        {dayNamesMin:['Mn','Se','Sl','Rb','Km','Jm','Sb'],
        dateFormat:'yy-mm-dd'}); 
        $("[rel='editor']").tinymce({
			// Location of TinyMCE script
			script_url : 'scripts/tiny_mce/tiny_mce.js',

			// General options
			theme : "advanced",
                        skin  : "o2k7",
			plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,advlist",

			// Theme options
			theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
			theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,code",
			theme_advanced_buttons3 : "forecolor,backcolor,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen,pagebreak,|,insertdate,inserttime,preview",
			theme_advanced_toolbar_location : "external",
			theme_advanced_toolbar_align : "left",
			theme_advanced_statusbar_location : "bottom",
			theme_advanced_resizing : true,

			// Example content CSS (should be your site CSS)
			content_css : "themes/default/default.css",

			// Drop lists for link/image/media/template dialogs
			template_external_list_url : "lists/template_list.js",
			external_link_list_url : "lists/link_list.js",
			external_image_list_url : "lists/image_list.js",
			media_external_list_url : "lists/media_list.js",

			// Replace values for the template plugin
			template_replace_values : {
				username : "Some User",
				staffid : "991234"
			}
		});
        }
        );
</script>
<script type="text/javascript">
function ajaxFileUpload()
	{
		$("#loading")
		.ajaxStart(function(){
			$(this).show();
		})
		.ajaxComplete(function(){
			$(this).hide();
		});

		$.ajaxFileUpload
		(
			{
				url:'doajaxfileupload.php',
				secureuri:false,
				fileElementId:'fileToUpload',
				dataType: 'json',
				//data:{name:'logan', id:'id'},
				success: function (data, status)
				{
					if(typeof(data.error) != 'undefined')
					{
						if(data.error != '')
						{
							alert(data.error);
						}else
						{
							alert(data.msg);
						}
					}
				},
				error: function (data, status, e)
				{
					alert(e);
				}
			}
		)
		
		return false;

	}
</script>